#!/usr/bin/env bash

# 定时检测 natapp 是否存活
# * * * * * /opt/shell/check_natapp.sh

process=`ps -ef | grep -w natapp | grep -v grep |wc -l`

# 判断 natapp 进程是否存活
if [ "$process" -eq 0 ]
then
    echo '------------------------------------------'
    echo '-----natapp未启动，现在开始启动...--------'
    echo '------------------------------------------'
    nohup /opt/natapp -authtoken=eb2ae279c0d7cd46 -log=stdout -loglevel=ERROR &
fi
